package jscinttools.scint.coincidence;

import jscinttools.scint.coincidence.*;
import jhplot.F1D;

/**
 *  Description of the Class
 *
 *@author     Marc-Antoine Verdier
 *@created    20 avril 2011
 */
public class CoincEfficiency
{
	private double[] ly;
	private double[] tau;
	private double tCoinc;
	private double n;
	private double m;


	/**
	 *  Constructor for the CoincEfficiency object
	 *
	 *@param  ly      Description of the Parameter
	 *@param  tau     Description of the Parameter
	 *@param  n       Description of the Parameter
	 *@param  m       Description of the Parameter
	 *@param  tCoinc  Description of the Parameter
	 */
	public CoincEfficiency(double[] ly, double[] tau, double tCoinc, double n, double m)
	{
		this.ly = ly;
		this.tau = tau;
		this.tCoinc = tCoinc;
		this.n = n;
		this.m = m;
	}


	/**
	 *  Constructor for the CoincEfficiency object
	 *
	 *@param  ly      Description of the Parameter
	 *@param  tau     Description of the Parameter
	 *@param  n       Description of the Parameter
	 *@param  tCoinc  Description of the Parameter
	 */
	public CoincEfficiency(double[] ly, double[] tau, double tCoinc, double n)
	{
		this(ly, tau, tCoinc, n, n);
	}


	/**
	 *  Constructor for the CoincEfficiency object
	 *
	 *@param  ly      Description of the Parameter
	 *@param  tau     Description of the Parameter
	 *@param  tCoinc  Description of the Parameter
	 */
	public CoincEfficiency(double[] ly, double[] tau, double tCoinc)
	{
		this(ly, tau, tCoinc, 0, 0);
	}


	/**
	 *  Description of the Method
	 *
	 *@param  coincProba  Description of the Parameter
	 *@return             Description of the Return Value
	 */
	public F1D photCoincEfficiency(CoincidenceProbability coincProba)
	{
		return new F1D(coincProba.photonEfficiency(ly, tau, tCoinc));
	}
}

